<table id='templateDetails' cellspacing=0 cellpadding=0 class='grid' style='width: 600px;'>
    <thead>
        <tr>
            <th>{translate}Order number{/translate}</th>
            <th>{translate}Role{/translate}</th>
            <th>{translate}Doctor{/translate}</th>
        </tr>
    </thead>
    
    <tbody>
    {foreach from=$items item=item}
        <tr id='{$item.surgery_team_template_item_id}'>
            <td>
                {$stt++}
            </td>
            <td>
                <select id='template_role_{$i}' name='template_role[]' onchange="javascript: getUsersByEmployeeTypeForTemplate('template_role_{$i}', 'template_employee_{$i}');" style='width: 205px;'>
                    {if $item.role == ''}
                        <option value='' selected='selected'>---</option>
                    {else}
                        <option value=''>---</option>
                    {/if}
                    
                    {html_options options=$roleList selected=$item.role}
                </select>
            </td>
            <td>
                <select id='template_employee_{$i}' name='template_employee[]' style='width: 205px;'>
                    {if $item.person_id == ''}
                        <option value='' selected='selected'>---</option>
                    {else}
                        <option value=''>---</option>
                    {/if}
                    
                    {html_options options=$item.employeeList selected=$item.person_id}
                </select>
            </td>
        </tr>
        
        <div style='display: none;'>
            {$i++}
        </div>
    {/foreach}  
    </tbody>
</table>

<table id='templateInfo' cellspacing=0 cellpadding=0 class='grid' style='width: 600px; border-top: none;'>
    <tr>
        <td class="first">&nbsp;</td>
        <td align="right">{translate}Prescription template name{/translate} (*)</td>
        <td class="last">
            <input type="text" value="{$template.template_name}" name="template_name" id="template_name" size="52"/>
        </td>
    </tr>
    
    <tr>
        <td class="first">&nbsp;</td>
        <td align="right">{translate}Description{/translate}</td>
        <td class="last">
            <textarea name="template_note" id="template_note" rows="2" cols="50">{$template.note}</textarea>
        </td>
    </tr>
</table>
